package br.edu.ufcg.greengrid.model.machine.state;

import br.edu.ufcg.greengrid.model.job.Job;
import br.edu.ufcg.greengrid.model.machine.Machine;

//TODO Test all classes that implements directly or indirectly this interface.
public interface MachineState {

	public static enum MSEnum {
		USER, IDLE, GRID, GOING_GREEN, GREEN, LEAVING_GREEN
	}
	
	public long getTimeSpent();
	
	public long getTotalTimeSpent();
	
	public MSEnum getType();
	
	//Operators that may change state
	public void setCountdown(long countdown);
	
	public void update(Machine m);
	
	public void changeStateIfNeeded(Machine m);
	
	public void setIdle(Machine m, long idletime);
	
	public void run(Machine m, Job job);
	
	public void wakeUp(Machine m);

}
